/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import java.awt.*;
import javax.swing.JPanel;
import javax.swing.border.EtchedBorder;
import javax.swing.border.LineBorder;

/**
 *
 * @author Dang Nhung
 */
public class MainForm1 extends javax.swing.JFrame {

   
    /**
     * Creates new form MainForm1
     */
    public MainForm1() {
        setResizable(false);
        initComponents();
        Toolkit tk=Toolkit.getDefaultToolkit();
        int xSize=((int)tk.getScreenSize().getWidth());
        int ySize=((int)tk.getScreenSize().getHeight());
        setSize(xSize,ySize);
        this.setLayout(new BorderLayout(xSize, ySize));
        
        int xSizePhay=(int)xSize/3;
        int xsize2phay=xSize-xSizePhay;
        int ysizePhay=(int)ySize-200;
        
        
        
        ///////////// Header 
        JPanel jpn_header = new JPanel();
        jpn_header.setBorder(new EtchedBorder(EtchedBorder.RAISED));
        jpn_header.setPreferredSize(new Dimension(xSize, 100));
        this.add(jpn_header, BorderLayout.NORTH);
        
        
        ///////////// LeftPanel      
        JPanel jpn_left = new JPanel();
//        jpn_left.setBorder(new EtchedBorder(EtchedBorder.RAISED));
        jpn_left.setBorder(new LineBorder (Color.black, 1, true));
        jpn_left.setSize(xSizePhay, ysizePhay);
      //  jpn_left.setPreferredSize(new Dimension(xSizePhay, ysizePhay));
        this.add(jpn_left, BorderLayout.WEST);
        
        
         /////////// RightPanel
        JPanel jpn_right = new JPanel();
        //jpn_right.setBorder(new EtchedBorder(EtchedBorder.RAISED));
        jpn_right.setBorder(new LineBorder (Color.black, 1, true));
        jpn_right.setPreferredSize(new Dimension(xsize2phay, ysizePhay));
        jpn_right.setLayout(new BorderLayout());
        this.add(jpn_right, BorderLayout.CENTER);
        
        
       ///////////// Footer
        JPanel jpn_footer = new JPanel();
        jpn_footer.setBorder(new EtchedBorder(EtchedBorder.RAISED));
        jpn_footer.setPreferredSize(new Dimension(xSize, 100));
        jpn_footer.setLayout(new BorderLayout());
        this.add(jpn_footer, BorderLayout.SOUTH);
        
          ////////////TopChildFooter
        JPanel jpn_topchildfooter = new JPanel();
        jpn_topchildfooter.setBorder(new EtchedBorder(EtchedBorder.RAISED));
        jpn_topchildfooter.setPreferredSize(new Dimension(xSize, 70));
        jpn_footer.add(jpn_topchildfooter, BorderLayout.NORTH);
        
          ///////////BottomChildFooter
        JPanel jpn_bottomchildfooter = new JPanel();
        jpn_bottomchildfooter.setBorder(new EtchedBorder(EtchedBorder.RAISED));
        jpn_bottomchildfooter.setPreferredSize(new Dimension(xSize, 30));
        jpn_footer.add(jpn_bottomchildfooter, BorderLayout.SOUTH);

        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setPreferredSize(new java.awt.Dimension(1185, 581));
        setResizable(false);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1185, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 581, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(MainForm1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(MainForm1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(MainForm1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(MainForm1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
        //</editor-fold>

        /*
         * Create and display the form
         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new MainForm1().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
